// 固定巡检
import httpAPI from '../../utils/http.js'
export default {
  /**
   * 全部巡检
   */
  getAllTask(params) {
    return httpAPI.get('system/patrolrecord/list', params)
  },
  /**
   * 我的巡检列表
   * @param {Object} params
   */
  getTaskList (params) {
    return httpAPI.get('system/patrolrecord/mytask', params)
  },
  /**
   * 巡检详情
   * @param {Object} id巡检id
   */
  getTaskRoute(id) {
    return httpAPI.get('/system/patrolrecord/' + id)
  },
  /**
   * 查询我整改的/抄送我的列表
   */
  getTaskAboutMyList(params) {
    return httpAPI.get('/system/patrolrecord/myreform',params)
  },
  /**
   * 巡检登记
   */
  taskRecord(params) {
    return httpAPI.post('/system/patrolrecord/submitresult',params)
  },
  /**
   * 巡更记录
   * @param {Object} pointId 巡更点id
   */
  getWatchmanList(pointId) {
    return httpAPI.get('system/patrolrecord/pointhistory/' + pointId)
  },
  /**
   * 固定巡检故障处理
   */
  taskRectification(params) {
    return httpAPI.post('system/patrolrecord/reformresult', params)
  },
  /**
   * 查询巡更点详情
   * @param {Object} id 巡更点id
   */
  getPointDetails(id) {
    return httpAPI.get('system/patrolpoint/' + id)
  },
  /**
   * 固定巡检统计
   * @param {Object} projectId 项目id
   */
  getFixedStatistical(projectId) {
    return httpAPI.get(`system/patrolrecord/${projectId}/todayReport`)
  }
}
